
public class AutoAssemblyLine implements IAssemblyLine{
	ILineStep cAB;
	ILineStep cAC;
	ILineStep cAE;
	
	public AutoAssemblyLine(ILineStep cAB,ILineStep cAC,ILineStep cAE){
		this.cAB=cAB;
		this.cAC=cAC;
		this.cAE=cAE;
		}
	public IProduct assembleProduct (IProduct product) {
		Body body =(Body) cAB.buildProductPart();
		product.installFirstPart(body);
		Chassis chassis=(Chassis) cAC.buildProductPart();
		product.installSecondPart(chassis);
		Engine engine=(Engine) cAE.buildProductPart();
		product.installThirdPart(engine);
		System.out.println("Auto created");
		return product;
	}
}